<?php
include_once( 'config.php' );
$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); 
mysql_select_db(DB_NAME,$con);
mysql_query("SET NAMES utf8");
$sql="select * from cai_log where data <=".(time()-129600)." order by id desc"; 
$result1 = mysql_query($sql);
$num_all = mysql_num_rows($result1);
echo '36小时前共有：'.$num_all.'个 ';
$sql2="DELETE FROM `chetan_h1`.`cai_log` where data <=".(time()-129600).";";
$result2=mysql_query($sql2);
if($result2){
    echo '删除成功<br/>';
}else{
    echo '删除失败<br/>';
}
?>